import request from '@/request'
import type { ApiResponse } from '@/common/requestType'

export function getCode(phone: string): Promise<ApiResponse<string>> {
  return request<string>({
    url: `/user/sendcode`,
    method: 'POST',
    data: {
      phone
    }
  })
}
